<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022/10/11
  Time: 21:12
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LinkedChat招聘网</title>
    <script src="${pageContext.request.contextPath}/public/static/js/jquery-3.6.0.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/public/static/css/JobDetail.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/public/static/css/Headers.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/public/static/css/Footers.css"/>
    <script src="${pageContext.request.contextPath}/public/static/js/index.js"></script>
    <script src="${pageContext.request.contextPath}/public/static/js/jquery-3.6.0.min.js"></script>
    <link href="${pageContext.request.contextPath}/public/static/images/login_icon.ico" rel="shortcut icon">

    <script type="text/javascript" src="https://api.map.baidu.com/api?v=3.0&ak=8muMyrLMQemAfxZAi9U2D5gUwW1hIB8t"></script>
</head>
<body>


<!--头部-->
<div id="header"></div>
<script>
    $(function() {
        $('#header').load('${pageContext.request.contextPath}/public/Person/header.jsp');
    })
</script>


<!-- 头部详情栏 -->
<div class="job-banner">
    <img src="${pageContext.request.contextPath}/public/static/images/detail_bg.jpg" alt="">
    <div class="inner ">
        <div class="info-primary">
            <span>招聘中</span>
            <div class="name">
                <h1 class="jobname" title="java开发工程师（五险一金，不加班）">${result.data.jobDetail.jobName}</h1>
                <span class="salary">
                   <fmt:formatNumber value="${result.data.jobDetail.jobMinSalary}" type="number" />
                    -
                    <fmt:formatNumber value="${result.data.jobDetail.jobMaxSalary}" type="number"/>

                </span>
            </div>
            <div class="demand">
                <ul>
                    <li>
                        <a href="" class="loctionjob">苏州${result.data.jobDetail.jobLocArea}</a>
                    </li>
                    <li>
                        <a href="">${result.data.jobDetail.jobExperience}</a>
                    </li>
                    <li>
                        <a href="">${result.data.jobDetail.jobDegree}</a>
                    </li>
                </ul>
            </div>
            <div class="Btn">
                <div class="care">
                    <a  href="javascript:void(0)" >
                        <img src="${pageContext.request.contextPath}/public/static/images/aixin.png" alt="" style="width: 20px" >
                        <span class="word1">收藏</span>
                    </a>
                </div>
                <div class="talk">
                    <a href="javascript:void(0)" id="talk">立即沟通</a>
                    <input type="hidden" value="${sessionScope.loginPerson.personName}" id="personName">
                </div>
            </div>
        </div>

        <div class="contain">
            <div class="container">
                <span>交通补助</span>
                <span>节日福利</span>
                <span>通讯补贴</span>
                <span>住房补贴</span>
                <span>带薪年假</span>
            </div>
        </div>
    </div>
</div>


<div class="body">
    <div class="content">
        <div class="content-left">
            <div class="content-head">
                <img src="${result.data.companyDetail.companyImg}" style="width: 60px" alt="">
                <span>${resultmanager.data.manageName}</span>
                <span>${resultmanager.data.managePosition}</span>
            </div>
            <span class="jobmiaoshu">职位描述</span>
            <div class="miaoshucontent">
                ${result.data.jobDetail.jobDescribe}
                <%--                <p style="line-height: 2;"><span style="color: rgb(81, 88, 109); background-color: rgb(255, 255, 255); font-size: 14px;">岗位职责：<br>1、参与公司自研项目系统的需求调研和需求分析。<br>2、搭建系统开发环境，完成系统框架和核心代码的实现。<br>任职要求：<br>1、计算机及相关专业本科或以上学历，3年以上Java项目经验。<br>2、熟悉Java语言，熟悉J2EE相关编程规范。了解常用设计模式，善于分析代码，系统调优。<br>3、掌握主流开源框架，如：Spring，SpringMVC，SpringBoot，MyBatis等，熟悉Rest接口开发。<br>4、具备常用数据库PostgresQL或MySQL应用经验，具备高性能SQL调优能力。<br>5、掌握GIT，Maven软件工程管理工具。<br>6、掌握JavaScript，CSS，HTML等前端开发技术，熟悉VUE或React,HTML5等前端开发框架者优先。<br>7、有ERP或OA系统开发经验者优先。<br>双休，朝九晚六。</span></p><p><br></p>--%>
            </div>
            <span class="companyintroduce">公司介绍</span>
            <div class="introducecom">
                <%--                <p style="line-height: 2;">--%>

                <%--                    <span  class="spancontent" style="color: rgb(81, 88, 109); background-color: rgb(255, 255, 255); font-size: 14px;">--%>
                <%--                    走进尚华科技<br>【尚华科技是谁】<br>尚华科技于2017年成立于安徽省合肥市，总部位于上海市普陀区，现有员工200人，组织架构现有上海尚华实业有限公司，苏州尚华电子科技有限公司，安徽尚华电子科技有限公司。--%>
                <%--                    <br>【尚华科技发展】<br>2017年，尚华科技专注跨境电商业务，自团队成立以来，一直持续保持高速稳定的增长，为欧洲，北美，等超过十几个国家和地区提供产品和服务，并广受好评。 尚华科技发展至今，一直坚持平台战略，坚持以客户为本，并坚信认真用心为全球客户提供最好的产品和服务才是企业的使命。我们坚信人才是企业发展的第一生产力，我们的目标是能够成为跨境电商领域的领航者。<br> &nbsp;尚华科技拥有众多电商领域的年轻精英，我们对于人才的定义不仅仅局限于技能这一方面，更注重人才在其他领域所具备的潜力与特质，我们愿意与人才一同成长，愿意给人才成长的空间和时间，坚持以奋斗者为主体，让奋斗和积极努力成为企业的主旋律。同时我们致力于打造扁平化透明化的管理环境，积极提高管理技巧，无论何时都要学会站在所有同事的角度和立场去看问题，营造一个年轻活力，充满动力希望的工作环境，我们坚决反对狭隘的办公室与层级文化，不扼杀属于年轻人应有的活力与创新，对年轻给与应有的包容和成长。--%>

                <%--                    <br>【尚华科技人才培养】<br>尚华科技尊重知识，重视人才，给人才成长的机会和发展的平台。公司会通过内部竞聘为人才提供成长和晋升的机会，也会提供系统的培训和获取知识的渠道，让人才获得知识和技能的提升。在尚华科技，你会从人才成长为优质人才；在尚华科技，你会从小白成为电商精英。--%>
                <%--                    <br>【尚华科技薪酬福利】<br>薪酬策略：尚华科技采用领先型薪酬策略，设计有竞争力的薪酬福利体系和完善的薪酬激励制度，包括但不限于绩效工资、年终奖金。<br>员工保障：入职公司即为人才购买五险，正常享受法定假期：较长带薪年假、产假等。<br>暖心福利：公司每周提供丰富的下午茶，每天有免费零食、水果，定期团建，每年组织旅游，发放生日礼金，开工红包等。<br>培训晋升：尚华科技有通畅的晋升渠道，规范的晋升机制，此外，公司还提供种类丰富的书籍和外出学习的机会，给人才提供外部培训和自我提升的良好途径。<br>工作环境：公司在高档写字楼有宽敞明亮的办公室，办公环境舒适。身边有积极进取的高素质年轻小伙伴相互交流学习，工作舒心。<br>节日小惊喜：各种传统节日都备有节日礼品或礼金，还有各种节日小惊喜。<br>欢迎加入尚华科技，我们一起成就更好的自己。--%>

                <%--                </span>--%>
                <%--                </p><p><br></p>--%>
                ${result.data.companyDetail.companyDetail}
            </div>

            <a href="javascript:void(0)" class="lookall">显示全部</a>

            <br>
            <span class="comparefenxi">竞争力分析</span>
            <div class="levelline">
                <div class="levelword1">综合竞争力评估</div>
                <div class="levelword2">你在？位置</div>
                <div class="level level-word">
                    <div class="level1"></div>
                    <div class="level2">
                        <em>一般</em>
                    </div>
                    <div class="level3"><em>良好</em></div>
                    <div class="level4"><em>优秀</em></div>
                    <div class="level5"><em>极好</em></div>
                </div>
            </div>
            <div  class="levelast">
                <div class="comparedetail">个人综合排名：在 人中排名第 </div>
                <a href="" class="look">查看个人排名</a>
            </div>
            <span class="gongshangmsg">工商信息</span>
            <div class="gsmsg">
                <div class="comname">安徽尚华电子科技有限公司</div>
                <div class="comxiangqing">
                    <ul>
                        <li>
                            <span class="xiangqing1">法定代表人：</span>
                            <span class="xiangqing1-content">毛志伟</span>
                        </li>
                        <li>
                            <span class="xiangqing2">注册资金：</span>
                            <span class="xiangqing2-content">500万人民币</span>
                        </li>
                        <li>
                            <span class="xiangqing3">成立日期：</span>
                            <span class="xiangqing3-content">2017-07-10</span>
                        </li>
                        <li>
                            <span class="xiangqing4">企业类型：</span>
                            <span class="xiangqing4-content">有限责任公司（非自然人投资或控股的法人独资）</span>
                        </li>
                        <li>
                            <span class="xiangqing5">经营状态：：</span>
                            <span class="xiangqing5-content">存续</span>
                        </li>

                    </ul>
                    <%--                    <a  href="" class="checkall">查看全部</a>--%>
                </div>
            </div>
            <div class="map" id="Map">


            </div>
            <!--                看过职位的还看了-->
            <span class="otherlook">看过职位的还看了</span>
            <div class="otherlookcontent">
                <ul>
                    <li>
                        <a href="">
                            <img src="${pageContext.request.contextPath}/public/static/images/jobdatail_jobpic.png" alt="" style="width: 62px">
                            <div class="job_cont">
                                <span class="job_name">java开发工程师</span>
                                <span class="job_salary">11-16K</span>
                                <span class="job_address">
                                    <i>首医</i>
                                     <i>苏州</i>
                                </span>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <img src="${pageContext.request.contextPath}/public/static/images/jobdatail_jobpic.png" alt="" style="width: 62px">
                            <div class="job_cont">
                                <span class="job_name">java开发工程师</span>
                                <span class="job_salary">11-16K</span>
                                <span class="job_address">
                                    <i>首医</i>
                                     <i>苏州</i>
                                </span>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="">
                            <img src="${pageContext.request.contextPath}/public/static/images/jobdatail_jobpic.png" alt="" style="width: 62px">
                            <div class="job_cont">
                                <span class="job_name">java开发工程师</span>
                                <span class="job_salary">11-16K</span>
                                <span class="job_address">
                                    <i>首医</i>
                                     <i>苏州</i>
                                </span>
                            </div>
                        </a>
                    </li>
                </ul>
            </div>
            <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_bottom.png" alt="" style="width: 800px" class="bottom1">
        </div>

        <div class="content-right">
            <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_jiaduo.webp" alt="" style="width: 350px">
            <div class="companybasic">
                <span class="basicmsg">公司基本信息</span>
                <div class="commsg">
                    <div class="nameandlogo">
                        <img src="${pageContext.request.contextPath}/public/static/images/jobdatail_jobpic.png" alt="" style="width: 60px">
                        <span class="name_">尚华电子科技</span>
                    </div>
                    <div class="basic1">
                        <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_icon-stage.png" alt="">
                        <span class="basic1_con">未融资</span>
                    </div>
                    <div class="basic2">
                        <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_icon-scale.png" alt="">
                        <span class="basic2_con">100-499人</span>
                    </div>
                    <div class="basic3">
                        <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_icon-industry.png" alt="">
                        <span class="basic3_con">电子商务</span>
                    </div>
                </div>
            </div>
            <div class="similiarjob">
                <span class="similiar">相似职位</span>
                <ul class="tuijiande ">

                    <%--                    <li>--%>
                    <%--                        <a href="">--%>
                    <%--                            <div class="li-left">--%>
                    <%--                                <span class="li_name">Java开发工程师（双休，早9晚5） </span>--%>
                    <%--                                <span class="li_salary">10-15K·15薪</span>--%>
                    <%--                                <span class="li_com">世纪飞越</span>--%>
                    <%--                                <span class="li_adre">苏州</span>--%>

                    <%--                            </div>--%>
                    <%--                            <div class="li-right"><img src="${pageContext.request.contextPath}/public/static/images/jobdetail_com1.png" alt="" style="width: 60px"> </div>--%>
                    <%--                        </a>--%>
                    <%--                    </li>--%>
                    <%--                    <li>--%>
                    <%--                        <a href="">--%>
                    <%--                            <div class="li-left">--%>
                    <%--                                <span class="li_name">Java开发工程师（双休，早9晚5） </span>--%>
                    <%--                                <span class="li_salary">10-15K·15薪</span>--%>
                    <%--                                <span class="li_com">世纪飞越</span>--%>
                    <%--                                <span class="li_adre">苏州</span>--%>
                    <%--                            </div>--%>
                    <%--                            <div class="li-right"><img src="${pageContext.request.contextPath}/public/static/images/jobdetail_com1.png" alt="" style="width: 60px"> </div>--%>
                    <%--                        </a>--%>
                    <%--                    </li>--%>
                    <%--                    <li>--%>
                    <%--                        <a href="">--%>
                    <%--                            <div class="li-left">--%>
                    <%--                                <span class="li_name">Java开发工程师（双休，早9晚5） </span>--%>
                    <%--                                <span class="li_salary">10-15K·15薪</span>--%>
                    <%--                                <span class="li_com">世纪飞越</span>--%>
                    <%--                                <span class="li_adre">苏州</span>--%>
                    <%--                            </div>--%>
                    <%--                            <div class="li-right"><img src="${pageContext.request.contextPath}/public/static/images/jobdetail_com1.png" alt="" style="width: 60px"> </div>--%>
                    <%--                        </a>--%>
                    <%--                    </li>--%>
                </ul>
            </div>
            <input type="hidden" value="${sessionScope.loginPerson.personName}" id="personNames">
            <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_guanggao1png.png" alt="" style="width: 350px" class="pic">
            <img src="${pageContext.request.contextPath}/public/static/images/jobdetail_guanggao2.jpg" alt="" style="width: 350px" class="pic">
        </div>
    </div>
</div>


<script src="${pageContext.request.contextPath}/public/static/js/JobDetail.js"></script>
<!--<div id ="footer"></div>-->
<!--<script type="text/javascript">-->
<!--    $("#footer").load("HeaderAndFooter/footers.html");-->
<!--</script>-->
</body>
<%--<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key=72de28bf5495c8c14eaccb0c383c6f91"></script>--%>


<%--<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=8muMyrLMQemAfxZAi9U2D5gUwW1hIB8t"></script>--%>
<script>

    //初始化地图插件
    // 百度地图API功能
    // Window.onload=function() {

    var loc="${result.data.jobDetail.jobLocArea}"
    console.log("------------"+loc)
    var area="苏州"+loc;
    console.log("area"+area)
    var map = new BMap.Map("Map");  // 创建Map实例
    map.centerAndZoom(area, 15);      // 初始化地图,用城市名设置地图中心点

    //判断职位是否已被收藏
    isExist();
    function isExist(){
        var token = localStorage.getItem("token");
        var jobId=${result.data.jobDetail.jobId}
            console.log("****************token**************"+token)
        if (token!=null){
            $.ajax({
                type: "post",
                url:"${pageContext.request.contextPath}/mycollect/getcollect",
                data:{
                    token:token,
                    jobId:jobId
                },
                success:function (result){
// console.log("**************************"+result.data)
                    if (result.data!=null){
                        var jobId=result.code
                        console.log("///////////////////////////////////////////////////"+jobId)
                        $(".word1").text("已收藏")
                    }

                    else
                        $(".word1").text("收藏")

                }

            })
        }
        else {
            $(".word1").text("收藏")
        }
    }



    //推荐算法
    var token = localStorage.getItem("token");
    var jobId=${result.data.jobDetail.jobId}
        $.ajax({
            type:"post",
            url:"${pageContext.request.contextPath}/recommendByJob",
            data:{
                token:token,
                jobId:jobId,

            },
            success:function (result){
                console.log("-------------------------")
                $(".tuijiande").html("")
                var result=result.data
                console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+result.length)
                for (var i=0;i<result.length;i++){

                    var jobDetail=result[i].jobDetail
                    var companyDetail=result[i].companyDetail
                    var jobId=jobDetail.jobId
                    var jobName=jobDetail.jobName
                    var jobMinSalary=jobDetail.jobMinSalary
                    var jobMaxSalary=jobDetail.jobMaxSalary
                    var companyName=companyDetail.companyName
                    var companyImg=companyDetail.companyImg
                    var url1="${pageContext.request.contextPath}/job/getById/"+jobId
                    console.log("**************************************************************"+jobDetail.jobId)
                    var ele=' <li>'+' <a href="'+url1+'">'+'<div class="li-left">'+' <span class="li_name">'+
                        jobName+'</span>'+'<span class="li_salary">'+jobMinSalary+'-'+jobMaxSalary+
                        '<span class="li_com">'+companyName+'</span>'+'  <span class="li_adre">'+
                        '苏州'+'</span>'+'</div>'+' <div class="li-right">'+'<img src="'+companyImg+'" alt="" style="width: 60px">'+'</div>'+'       </a>'+
                        '  </li>'
                    $(".tuijiande ").append(ele)
                }
            }
        })


    //点击收藏
    <%--    $(".care").click(function (){--%>
    <%--        var token=localStorage.getItem("token")--%>
    <%--        if (token==null){--%>
    <%--            alert("请先登录")--%>
    <%--        }else{--%>
    <%--        $(".word1").text("已收藏")--%>
    <%--        var jobId=${result.data.jobDetail.jobId}--%>
    <%--        console.log("jobId---------"+jobId)--%>
    <%--        console.log("token========="+token)--%>
    <%--        &lt;%&ndash;var comId=${result.data.companyDetail.companyId}&ndash;%&gt;--%>
    <%--        $.ajax({--%>
    <%--            url:"${pageContext.request.contextPath}/job/sendToCollect",--%>
    <%--            type:"post",--%>
    <%--            data:{--%>
    <%--               jobId:jobId,--%>
    <%--                token:token--%>
    <%--            },--%>
    <%--            success:function (result){--%>
    <%--                var result=result.data;--%>
    <%--                console.log("-------------------result"+result)--%>

    <%--            }--%>
    <%--        })--%>
    <%--        }--%>
    <%--    })--%>

    $(".care").click(function (){
        var token=localStorage.getItem("token")
        var personNames = $("#personNames").val()
        if (personNames == ""){
            alert("长时间未使用，重新登录")
            location.href = "${pageContext.request.contextPath}/public/Person/Login.jsp";
        }else{
            if($(".word1").text()=="收藏"){
                $(".word1").text("已收藏")
                var jobId=${result.data.jobDetail.jobId}
                    console.log("jobId---------"+jobId)
                console.log("token========="+token)
                <%--var comId=${result.data.companyDetail.companyId}--%>
                $.ajax({
                    url:"${pageContext.request.contextPath}/job/sendToCollect",
                    type:"post",
                    data:{
                        jobId:jobId,
                        token:token
                    },
                    success:function (result){
                        var result=result.data;
                        console.log("-------------------result"+result)

                    }
                })
            }else{

                var jobId=${result.data.jobDetail.jobId}
                    $.ajax({
                        type:"post",
                        url:"${pageContext.request.contextPath}/mycollect/delCollect",
                        data:{
                            jobId:jobId,
                            token:token
                        },
                        success:function (result){
                            $(".word1").text("收藏")
                        }

                    })
            }
        }
    })

    <%--$(".care").click(function (){--%>
    <%--    --%>
    <%--    $.ajax({--%>
    <%--        type:"post",--%>
    <%--        url:"${pageContext.request.contextPath}/mycollect/delCollect",--%>
    <%--        data:{--%>
    <%--            jobId:jobId,--%>
    <%--            token:token--%>
    <%--        },--%>
    <%--        success:function (result){--%>
    <%--            $(".word1").text("收藏")--%>
    <%--        }--%>

    <%--    })--%>
    <%--})--%>

    var jobId=${result.data.jobDetail.jobId}
    <%--    function saveCoookie(jobId){--%>
    var token=localStorage.getItem("token");
    $.ajax({
        type:"post",
        data:{
            jobId:jobId,
            token:token
        },
        url:"${pageContext.request.contextPath}/job/saveInCookie",
        success:function (){


        }
    })

    $("#talk").click(function (){
        var loginPersonName = $("#personName").val();
        if(loginPersonName === ""){
            alert("你的消息用户名已下线，从新登录吧赶紧！")
            location.href = "${pageContext.request.contextPath}/public/Person/Login.jsp";
        }else {
            location.href = "${pageContext.request.contextPath}/static/chatMain.jsp";
        }
    })

</script>
</html>
